package com.cloudlead.plugin.security.query;

import static com.mysema.query.types.PathMetadataFactory.*;
import com.cloudlead.plugin.security.entity.EScUserHasRole;


import com.mysema.query.types.path.*;

import com.mysema.query.types.PathMetadata;
import javax.annotation.Generated;
import com.mysema.query.types.Path;

import com.mysema.query.sql.ColumnMetadata;
import java.sql.Types;

import com.mysema.query.sql.*;

import com.cloudlead.common.lang.annotation.Label;


/**
 * QScUserHasRole is a Querydsl query type for EScUserHasRole
 */
@Label("用户对应的角色查询")
@Generated("com.cloudlead.utils.persistence.codegen.serializer.SimpleMetaDataSerializer")
public class QScUserHasRole extends RelationalPathBase<EScUserHasRole> {

    private static final long serialVersionUID = -491553026;

    public static final QScUserHasRole scUserHasRole = new QScUserHasRole("sc_user_has_role");

    public class PrimaryKeys {

        public final PrimaryKey<EScUserHasRole> primary = createPrimaryKey(id);

    }

    public class ForeignKeys {

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScUser> scUserHasRoleScUser1Fk = createForeignKey(scUserId, "id");

        public final ForeignKey<com.cloudlead.plugin.security.entity.EScRole> scUserHasRoleScRole1Fk = createForeignKey(scRoleId, "id");

    }

    public final StringPath id = createString("id");

    public final StringPath scRoleId = createString("scRoleId");

    public final StringPath scUserId = createString("scUserId");

    public final PrimaryKeys pk = new PrimaryKeys();

    public final ForeignKeys fk = new ForeignKeys();

    public QScUserHasRole(String variable) {
        super(EScUserHasRole.class, forVariable(variable), "null", "sc_user_has_role");
        addMetadata();
    }

    public QScUserHasRole(String variable, String schema, String table) {
        super(EScUserHasRole.class, forVariable(variable), schema, table);
        addMetadata();
    }

    public QScUserHasRole(Path<? extends EScUserHasRole> path) {
        super(path.getType(), path.getMetadata(), "null", "sc_user_has_role");
        addMetadata();
    }

    public QScUserHasRole(PathMetadata<?> metadata) {
        super(EScUserHasRole.class, metadata, "null", "sc_user_has_role");
        addMetadata();
    }

    public void addMetadata() {
        addMetadata(id, ColumnMetadata.named("id").withIndex(1).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(scRoleId, ColumnMetadata.named("sc_role_id").withIndex(3).ofType(Types.CHAR).withSize(24).notNull());
        addMetadata(scUserId, ColumnMetadata.named("sc_user_id").withIndex(2).ofType(Types.CHAR).withSize(24).notNull());
    }

}

